//{{AFX_INCLUDES()
//}}AFX_INCLUDES
#if !defined(AFX_PAGEMOBILELAYOUT_H__85AD5BE1_BB9A_4FCF_93B9_C02A3842A6A8__INCLUDED_)
#define AFX_PAGEMOBILELAYOUT_H__85AD5BE1_BB9A_4FCF_93B9_C02A3842A6A8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// PageMobileLayout.h : header file
#include "RptItemPhoneButton.h"
//
const UINT XTP_ID_REPORT_CONTROL1 = 101;
const UINT XTP_ID_REPORT_CONTROL2 = 102;

class CPageMobileLayout;
class CXTPCustomDrawReportPaintManager : public CXTPReportPaintManager
{
public:
	CXTPCustomDrawReportPaintManager(CPageMobileLayout* pParent);
	virtual ~CXTPCustomDrawReportPaintManager();
	virtual int GetRowHeight(CDC* pDC, CXTPReportRow* pRow);
	
protected:
	CPageMobileLayout* m_pParent;
};

/////////////////////////////////////////////////////////////////////////////
// CPageMobileLayout dialog

class CPageMobileLayout : public CXTPPropertyPage
{
	DECLARE_DYNCREATE(CPageMobileLayout)
// Construction
public:
	CXTPReportControl m_RptLayout;
	int m_Col;
	int m_Row;
	CPageMobileLayout();   // standard constructor

// Dialog Data
	//{{AFX_DATA(CPageMobileLayout)
	enum { IDD = IDD_PAGE_MOBILELAYOUT };
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CPageMobileLayout)
	public:
	virtual void OnOK();
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CPageMobileLayout)
	virtual BOOL OnInitDialog();
	afx_msg void OnButtonAdd();
	afx_msg void OnButtonDel();
	afx_msg void OnButtonDown();
	afx_msg void OnButtonUp();
	afx_msg void OnUpdateButtonAdd(CCmdUI* pCmdUI);
	afx_msg void OnUpdateButtonDel(CCmdUI* pCmdUI);
	afx_msg void OnUpdateButtonDown(CCmdUI* pCmdUI);
	afx_msg void OnUpdateButtonUp(CCmdUI* pCmdUI);
	//}}AFX_MSG
	afx_msg void OnRptCommandListItemlClick(NMHDR * pNotifyStruct, LRESULT * result);
	afx_msg void OnRptCommandListItemDblClick(NMHDR * pNotifyStruct, LRESULT * result);
	afx_msg void OnRptLayoutItemlClick(NMHDR * pNotifyStruct, LRESULT * result);
	DECLARE_MESSAGE_MAP()
private:
	CXTPToolBar m_ToolBar;
	CXTPReportControl m_RptCommandList;	
	CRptItemPhoneButton* m_SelPhoneButton;
	
private:
	CXTPReportRecord* GetCustomHeadRecord();
	void FillPreferenceCommandList();
	void FillCustomCommandList();
	void SetReziseCtrl();
	void SetSize();	
	void CreateCtrl();
	void ShowData();
	void SaveData();
	void ShowCommandList();
	void ShowLayout();
	void SetLayoutGrid();
	void FillLayoutGrid();
	CString FindName(int Code);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_PAGEMOBILELAYOUT_H__85AD5BE1_BB9A_4FCF_93B9_C02A3842A6A8__INCLUDED_)
